/**
 * ...
 * @author Krzysztof Rozalski
 */

package hapi.unit;
import haxe.unit.TestResult;
import haxe.unit.TestRunner;

class FlashDevelopTestRunner extends TestRunner {
	
	var pathToTests:String;
	
	public function new(?pathToTests:String="") {
		super();
		this.pathToTests = pathToTests;
	}
	
	public override function run() : Bool {
		var flashDevResult:FlashDevelopTestResult = new FlashDevelopTestResult(pathToTests);
		result = flashDevResult;
		for ( c in cases ){
			runCase(c);
		}
		TestRunner.print(result.toString());
		flashDevResult.printFailedToStdError();
		return result.success;
	}
}